#include<iostream>
#include<string>
#include<cstring>
using namespace std;

bool vis[110][26];
bool check(int left,int right){
    for(int i=0;i<26;i++){
        if(vis[left][i]&&vis[right][i]) return true;
}
    return false;
}
int main(){
    int t;
    cin>>t;
    while(t--){
        memset(vis,0,sizeof(vis));
        int n;
        cin>>n;
        string s;
        for(int i=0;i<n;i++){
            cin>>s;
            for(auto ch:s){
                vis[i][ch-'a'] =true;
            } 
        }
        int left=0,right=n-1;
        while(left<right){
            if(check(left,right)) {
                ++left;
                --right;
            }
            else break;
        }
        if(left<right) cout<<"No"<<endl;
        else cout<<"Yes"<<endl;
    }
    return 0;
}